from django.db import models

# Create your models here.
"""
缴费详情表
"""
from pay_cost.models import PayCostModel


class StudentsCost(models.Model):
    pay_status_choices = (
        ('0','已缴费'),
        ('1','未缴费'),
    )
    # name = models.CharField(max_length=12, verbose_name='姓名', null=False)
    # grade = models.CharField(max_length=32, verbose_name='年级', null=False)
    # the_class = models.CharField(max_length=32, verbose_name='班级', null=False)
    # id_number = models.CharField(max_length=18, verbose_name='身份证号', null=False, unique=True)
    # pay_time = models.DateTimeField(auto_now_add=True, verbose_name='缴费日期', null=False)
    # pay_type = models.CharField(max_length=12, verbose_name='缴费类型', null=False)
    pay_info = models.ForeignKey(PayCostModel, on_delete=models.CASCADE, null=True)
    pay_money = models.CharField(max_length=8, verbose_name='缴费金额', null=False)
    pay_times = models.CharField(max_length=16, verbose_name='缴费时间')
    pay_order = models.CharField(max_length=16, verbose_name='缴费订单号', null=False, unique=True)
    pay_statu = models.CharField(max_length=12,verbose_name='缴费状态',choices=pay_status_choices,default=1)
    class Meta:
        db_table = 'student_cost'
        verbose_name = '缴费详情表'
        verbose_name_plural = verbose_name
